<include file="Common:layout" />
<body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div id="list">
        <div class="fixed-bar">
            <div class="item-title">
                <div class="subject">
                    <h3>信息设置</h3>
                    <h5>短信发送方式设置</h5>
                </div>
            </div>
        </div>
        <!-- 操作说明 -->
        <div class="explanation" id="explanation">
            <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
                <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
                <span id="explanationZoom" title="收起提示"></span> </div>
            <ul>
                <li>系统平台短息发送设置，只能同时开启一个短信服务使用。</li>
            </ul>
        </div>

        <div class="flexigrid">
            <div class="hDiv">
                <div class="hDivBox">
                    <table cellspacing="0" cellpadding="0">
                        <thead>
                        <tr>
                            <th axis="col1" class="handle" align="center">
                                <div style="text-align: center; width: 150px;">操作</div>
                            </th>
                            <th axis="col2" class="" align="left">
                                <div style="text-align: center; width: 130px;">服务名称</div>
                            </th>
                            <th style="width:100%" axis="col7">
                                <div></div>
                            </th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>

            <div class="bDiv" style="height: auto;">
                <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
                    <table>
                        <tbody>
                        <foreach name="sms_services" item="sms">
                            <tr id="row130" data-id="130" class="">
                                <td class="col1" align="center">
                                    <div style="text-align: center;width:150px;">
                                        <if condition="$sms['is_open'] eq 1">
                                            <a class="btn blue" href="{:U('System/sms_edit',array('id'=>$sms['sms_id']))}"><i class="fa fa-edit"></i>编辑</a>
                                            <a class="btn red" data-url="{:U('System/sms_uninstall',array('id'=>$sms['sms_id']))}" onclick="delRegion(this);">
                                                <i class="fa fa-trash-o"></i>卸载
                                            </a>
                                            <else/><a class="btn green" href="{:U('System/install_sms',array('id'=>$sms['sms_id']))}"><i class="fa fa-cog"></i>安装</a>
                                        </if>
                                    </div>
                                </td>
                                <td class="col2" align="left">
                                    <div style="text-align: center; width: 130px;">
                                        <if condition="$sms['is_open'] eq 1">
                                            <span class="label label-success">{$sms['sms_name']}</span>
                                            <else/>{$sms['sms_name']}
                                        </if>
                                    </div>
                                </td>
                                <td align="" class="" style="width: 100%;">
                                    <div>&nbsp;</div>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                </div>
                <div class="iDiv" style="display: none;"></div>
            </div>
        </div>
    </div>
</div>
<script>
    function delRegion(obj){
        layer.confirm('确定卸载此方式？', {icon: 3, title:'卸载提示'}, function(index){
            layer.close(index);
            window.location.href = $(obj).attr('data-url');
        });
    }
</script>
</body>
</html>